    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// demo接口1
export const deleteById = (userId:any) => {
    return service({
        url: '/user/index/deleteById/' + userId,
        method: 'post'
    })
};


// 登录用户
export const login = (data:any) => {
    return service({
        url: '/user/index/login',
        method: 'post',
        data
    })
};
// 列表分页
export const getUserList = (data:any) => {
    return service({
        url: '/user/index/getUserList',
        method: 'post',
        data
    })
};
// 修改列表
export const updateUser = (data:any) => {
    return service({
        url: '/user/index/updateUser',
        method: 'post',
        data
    })
};
// 修改列表
export const deleteByIdAll = (data:any) => {
    return service({
        url: '/user/index/deleteByIdAll',
        method: 'post',
        data
    })
};
// 修改列表
export const getBrandList = (data:any) => {
    return service({
        url: '/shop/index/getBrandList',
        method: 'post',
        data
    })
};
// 修改列表
export const checkUser = (data:any) => {
    return service({
        url: '/user/index/checkUser',
        method: 'post',
        data
    })
};
// 修改列表
export const addBrand = (data:any) => {
    return service({
        url: '/shop/index/addBrand',
        method: 'post',
        data
    })
};
// 修改列表
export const updateBrandStatus = (data:any) => {
    return service({
        url: '/shop/index/updateBrandStatus',
        method: 'post',
        data
    })
};
// 修改列表
export const getTypeTree = () => {
    return service({
        url: '/shop/index/getTypeTree',
        method: 'get',
    })
};
// 修改列表
export const getMenuById = () => {
    return service({
        url: '/user/index/getMenuById',
        method: 'post',
    })
};

// 修改类型状态
export const setTypeStatus = (typeId:any,typeStatus:any) => {
    return service({
        url: '/shop/index/setTypeStatus/' + typeId + '/' + typeStatus,
        method: 'post'
    })
};
// 删除商品类型
export const deleteTypeById = (typeId:any) => {
    return service({
        url: '/shop/index/deleteTypeById/' + typeId,
        method: 'post'
    })
};

// 添加商品类型
export const addType = (data:any) => {
    return service({
        url: '/shop/index/addType',
        method: 'post',
        data
    })
};
// 修改商品类型
export const updateType = (data:any) => {
    return service({
        url: '/shop/index/updateType',
        method: 'post',
        data
    })
};
// 商品列表
export const getProdList = (data:any) => {
    return service({
        url: '/shop/index/getProdList',
        method: 'post',
        data
    })
};
// 商品添加
export const addProd = (data:any) => {
    return service({
        url: '/shop/index/addProd',
        method: 'post',
        data
    })
};
// 获取商品类型树
export const getTypeSelectTree = () => {
    return service({
        url: '/shop/index/getTypeSelectTree',
        method: 'get',
    })
};
// 获取所有品牌的列表
export const getBrandListAll = () => {
    return service({
        url: '/shop/index/getBrandListAll',
        method: 'post',
    })
};
// 获取所有单位
export const getUnitListAll = () => {
    return service({
        url: '/shop/index/getUnitListAll',
        method: 'post',
    })
};
// 获取所有标签列表
export const getTagListAll = () => {
    return service({
        url: '/shop/index/getTagListAll',
        method: 'post',
    })
};
// 获取所有供应商列表
export const getApprListAll = () => {
    return service({
        url: '/shop/index/getApprListAll',
        method: 'post',
    })
};
// 获取所有供应商列表
export const deleteProdAll = (data:any) => {
    return service({
        url: '/shop/index/deleteProdAll',
        method: 'post',
        data
    })
};


